﻿using Liukun.SmartParking.Client.Views;
using Prism.Ioc;
using Prism.Unity;
using System.Configuration;
using System.Data;
using System.Windows;
using Zhaoxi.SmartParking.Client.BLL;
using Zhaoxi.SmartParking.Client.DAL;
using Zhaoxi.SmartParking.Client.IBLL;
using Zhaoxi.SmartParking.Client.IDAL;

namespace Liukun.SmartParking.Client
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : PrismApplication
    {
        protected override Window CreateShell()
        {
            return Container.Resolve<MainWindow>();
        }

        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.Register<ILoginBLL, LoginBLL>();
            containerRegistry.Register<ILoginDal, LoginDal>();
        }

        protected override void InitializeShell(Window shell)
        {
            if (Container.Resolve<WinLogin>().ShowDialog() == true)
            {
                shell.ShowDialog();
                return;
            }
            Application.Current.Shutdown();
        }
    }

}
